﻿using InterviewerName.DateTimeService;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace InterviewerName.WinFormApp
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void InitializeComponent()
        {
            btnChinese = new Button();
            btnForeign = new Button();
            SuspendLayout();
            // 
            // btnChinese
            // 
            btnChinese.Location = new Point(110, 214);
            btnChinese.Name = "btnChinese";
            btnChinese.Size = new Size(240, 92);
            btnChinese.TabIndex = 0;
            btnChinese.Text = "显示中国时间戳";
            btnChinese.Click += BtnChinese_Click;
            // 
            // btnForeign
            // 
            btnForeign.Location = new Point(564, 214);
            btnForeign.Name = "btnForeign";
            btnForeign.Size = new Size(257, 92);
            btnForeign.TabIndex = 1;
            btnForeign.Text = "显示外国时间戳";
            btnForeign.Click += BtnForeign_Click;
           
            // 
            // MainForm
            // 
            ClientSize = new Size(967, 621);
            Controls.Add(btnChinese);
            Controls.Add(btnForeign);
            Name = "MainForm";
            Text = "时间戳显示";
            ResumeLayout(false);
        }

        private void BtnChinese_Click(object sender, EventArgs e)
        {
            IDateTimeService dateTimeService = new ChineseDateTime();
            MessageBox.Show(dateTimeService.GetDateTimeString(), "中国时间戳");
        }

        private void BtnForeign_Click(object sender, EventArgs e)
        {
            IDateTimeService dateTimeService = new ForeignDateTime();
            MessageBox.Show(dateTimeService.GetDateTimeString(), "外国时间戳");
        }

      
    }
}
